package com.iplant.ams.serviceImpl.dao.dms.scada;

import com.iplant.ams.service.po.dms.scada.status.DMSDeviceCurrentStatus;
import com.iplant.ams.service.po.dms.scada.status.DMSDeviceDetailStatus;
import com.iplant.base.po.OutResult;
import com.iplant.base.po.Pagination;
import com.iplant.base.utils.annotation.dao.DBBaseDAO;
import com.iplant.base.utils.sql.BaseDAO;
import com.iplant.basic.service.po.bms.BMSEmployee;
import lombok.extern.slf4j.Slf4j;

import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@DBBaseDAO(DMSDeviceCurrentStatus.class)
@Slf4j
public class DMSDeviceCurrentStatusDAO extends BaseDAO {

    private static DMSDeviceCurrentStatusDAO Instance = null;

    public static DMSDeviceCurrentStatusDAO getInstance() {
        if (Instance == null) {
            Instance = new DMSDeviceCurrentStatusDAO();
        }
        return Instance;
    }

    public DMSDeviceCurrentStatusDAO() {
        super("");this.Init();
    }

    public List<DMSDeviceCurrentStatus> DMS_SelectDeviceCurrentStatusList(BMSEmployee wLoginUser,
                                                                        List<String> wAssetNoList, int  wStatus,
                                                                        Calendar wStartTime, Calendar wEndTime,  Pagination wPagination, OutResult<Integer> wErrorCode){
        Map<String,Object> wParams= new HashMap<>();
        wParams.put("DeviceStatus", wStatus);
        wParams.put("AssetNo", wAssetNoList);
        wParams.put("StartTime", wStartTime);
        wParams.put("EndTime", wEndTime);
        return this.SelectPOList(wLoginUser, wParams , wPagination, wErrorCode);
    }



}
